<% content_for :main_content do %>
<div class="row">
  <div class="col-lg-12">
      <section class="panel">
          <header class="panel-heading">
            <%= t(".terminal") %>
          </header>
          <div class="panel-body">

            <div class="clearfix">
                <div class="btn-group">
                  <span class="btn btn-primary">
                    <%= link_to fa_icon("plus"), new_merchant_terminal_path %>
                  </span>
                </div>
            </div>

            <div class="space15"></div>

            <table class="table table-striped table-advance table-hover">
              <thead>
              <tr>
                  <th>mac</th>
                  <th>mid</th>
                  <th>时长</th>
                  <th></th>
              </tr>
              </thead>
                <tbody>
                <% @terminals.each do |terminal| %>
                  <tr>
                    <td><%= terminal.mac %></td>
                    <td><%= terminal.mid %></td>
                    <td><%= humanize_second terminal.duration.to_i %></td>
                    <td><span class="btn btn-primary btn-xs"><%= link_to fa_icon("pencil"), edit_merchant_terminal_path(terminal) %><i class="icon-pencil"></i></span></td>
                  </tr>
                <% end %>
              </tbody>
          </table>
          </div>
      </section>
  </div>
</div>
<!-- page end-->
<% end %>

<% content_for :script do %>

<% end %>
